Chapter 4*125*

 Application Builder

 t General Features
 t Applicable Prograph Menus
 t Application Editor
 t Menu Editor
 t Window Editors
 t Window Item Editors
 t Balloon Help
 t Access to Events
 t Mouse Techniques

This chapter summarizes how to access and use the set of editors that make up Application Builder. These editors manage the creation, deletion, and modification of instances of the System classes specified in chapter 5, “System Classes.” With these editors you an easily construct a Macintosh interface for your application, complete with menus, windows and event-handling.

t
General Features*125*

Specification and WYSIWYG Editors*125*

The various system class editors organize and facilitate the building of applications as instances of Prograph System classes. 

There are two types of system class editors: Specification editors and WYSIWYG (what-you-see-is-what-you-get) editors. Every system class except System, Menu Item, and Graphic has its own Specification editor, while Window, Window Item, and all subclasses of Window Item (except Graphic) have WYSIWYG editors. Each of these editors can be used to edit either an instance of a class or the default values of the class itself.*126*

Each editor consists of a modal window in which the developer can observe and alter the values of some of the attributes of the instance or class to which the editor is being applied. 

Every Specification editor window has a heading displaying the name of the class of the edited window. Every Specification editor except the Window Item Specification editor has an editable-text field for changing the value of the instance attribute name. *126*

In a Specification editor window, the Tab key or the mouse can be used to move the text editor from one text field to another in the usual way, while mouse clicks are necessary for changing the values of buttons, check boxes, and radio buttons, or for selecting an item in a scrolling list. Every Specification editor window has a default button that is activated either by a mouse click or by pressing the Return key.*126*

When a Specification editor is first opened on a class or instance, the values of the items in the editor window correspond to the default values of attributes of the class or instance. As editing proceeds, this correspondence is, of course, not maintained. In the presentation of the Specification editors below, we describe the editor window items in terms of their correspondence with the values of attributes before any editing. *126*

All Specification editor windows have Cancel and OK buttons for terminating editing. Clicking the OK button changes the attribute values of the instance or class to reflect editing before dismissing the editor window. Clicking the Cancel button dismisses the editor without changing attribute values. 

In this chapter:*126*

o
The term “class” refers to a System class. 

o
“Attribute” refers to an instance attribute unless otherwise specified. 

o
An instance of a class “aClass” or one of its subclasses is denoted «aClass». 

System 7 Look and Feel*127*

The Prograph environment, and applications created with Prograph, support Macintosh System 7 conventions:

o
The Prograph Classic Interpreter, and applications produced with Prograph, are 32-bit clean: they run in both 24-bit and 32-bit memory mode.

o
Prograph is Stationery aware. The System Classes file is shipped as a Stationery document. When a Stationery document is opened, it opens as Untitled , and must be re-named before it can be saved. A Prograph document can be turned into a Stationery document by selecting the document icon (by single-clicking), doing a Get Info (key equivalent Cmd-I), and checking the Stationery pad check box in the Info dialog.l*127*

o
Balloon Help is available for the Interpreter and Compiler, and may be easily added to your applications.

o
Prograph notifies your application of Inter-Application Communication (IAC) events, and provides a high-level way of designating methods to respond to those events. You can also send IAC events. The Interpreter itself responds to Open Window, Close Window and Do Menu events.l*127*

o
Scroll lists are selectable items in a window, just as edit text items are. When a scroll list is selected, it gets a dark outline around its boundary. Scroll lists have arrow key support.

o
System Classes include support for outline fonts and for styled text records.

o
Title bars, menus and list items have true grays. 

o
True grays are used when drawing inactive windows, menus, menu items and scroll list items.l*127*